package com.feeyo.monitor;

import com.feeyo.monitor.utils.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.Date;


/**
 * 主程序启动类
 * @Author liulei
 */
//一个@SpringbootApplication相当于@Configuration,@EnableAutoConfiguration和 @ComponentScan
@ServletComponentScan
@SpringBootApplication
@EnableScheduling
//@EnableConfigurationProperties(RedisProperties.class)
public class BootStrap {
    static  Logger logger = LoggerFactory.getLogger(BootStrap.class);

    public static void main(String[] args) throws Exception {
        Date date = new Date();
        logger.info("current-datetime:"+new Date().toString());
        logger.info("timezone:" +java.util.TimeZone.getDefault().getDisplayName());
        logger.info("DateUtils.time:"+DateUtils.getHourlyStr(date));
        logger.info("timestamp:"+date.getTime());
        SpringApplication.run(BootStrap.class, args);
    }
}
